Skip to content

Fix nfsd 4.19 upgrade problems #77

Merged
merged 2 commits into from
Feb 10, 2019
Merged

Fix nfsd 4.19 upgrade problems #77

merged 2 commits into from
Feb 10, 2019

Conversation

donald
Copy link
Collaborator

@donald donald commented Feb 7, 2019

Fix nfsd parameter to prevent upgrade problems 4.14 -> 4.19

The file nfsd.service is currenty untracked.

Import it into mxtools. This is preferred to the option of including it
in the nfs_tools bee package, because it contains local configuration
(e.g. the number 64 for the nproc argument) and we don't want to rebuild
the bee package because of small configuration changes.

Also add file to install script.
The nfsd default lease time has been changed from 90 seconds to
45 seconds between Linux 4.14 and 4.19 by commit d6ebf5088f09
("nfsd4: return default lease period").

After the upgrade of a nfs server (claptrap) from 4.14 to 4.19, we
saw a failing process ("arplisten") and dmesg logs "NFS:
nfs4_reclaim_open_state: Lock reclaim failed!" on a client (moep,
4.14.87).  The client had the file system mounted with vers=4.0.

Network trace indicated, that the client continued to use the
90 seconds lease period of the previous server incarnation and
sent RENEWs every 60 seconds (2/3 of 90 seconds).  Sometimes the
server answered with NFS4ERR_EXPIRED.

When this happened, the client executed recovery (SETCLIENTID...) but
did non query the server for a new lease_time.  So the problem was
persistent even after the first failure.

As an experiment, I've also restarted a server with the lease time
decrement from 90 to 45 seconds, but the grace period fixed to
90 seconds. Now the client got NFS4ERR_STALE_CLIENTID  but still did
not query the server for a new lease_time and continued to send RENEWs
in 60 second intervals.

Add flags `--lease-time 90 and --grace-time 90` to nsfd to avoid upgrade
complexity. Also change existing option `-N 3` to long form
`--no-nfs-version 3` for readability.

A `systemctl daemon-reload && systemctl restart nfsd` puts the new
value into place as can be verified by `cat /proc/fs/nfsd/nfsv4leasetime`.
@donald donald merged commit 43255fd into master Feb 10, 2019
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant